#pragma once
#include "Common.h"

class D
{
public:
    D()
    {
        _pi = new int(10);
        _size = 0;
    }
    void Modify(int n) const
    {
        *_pi = n;
        _size = n;
    }
    void Print() const
    {
        cout << *_pi << endl;
        cout << _size << endl;
    }

private:
    int *_pi;
    mutable size_t _size;
};

void Test_ConstFunc()
{
    D d;
    d.Print();
    d.Modify(5);
    d.Print();
}